/*判断当前用户是否有添加宝宝*/
$(function(){
	$('.yimiao').on('click',function(){
		var th = $(this);
		ym.ajax({
			url: "/userChild/getUserChild",
			success: function (data) {
			   	if(data.res == 1){
			   		if(data.obj.length > 0){
			   			console.log("有宝宝");
			   			window.location.href = "vaccine2.html";
			   			//th.children('a').attr('href','vaccine2.html');
			   		}else{
			   			console.log("没有宝宝");
                        window.location.href = "vaccine1.html";
						//th.children('a').attr('href','vaccine1.html');
			   		}
			   	}else{console.log("获取宝宝失败!")}
			}
		});
	})
	
})
